pkgname=pppoe-conf
pkgver=0.1
pkgrel=1
pkgdesc="ADSL/PPPoE配置工具"
arch=('i686' 'x86_64')
url="http://archlive-pkg.googlecode.com"
license=('GPL')
depends=('gettext' 'sakura')
source=()
md5sums=()

build() {
	cp -r $startdir/{usr,etc} $pkgdir/
	install -d $pkgdir/usr/share/locale/zh_CN/LC_MESSAGES

	cp $pkgdir/usr/net-setup.mo $pkgdir/usr/share/locale/zh_CN/LC_MESSAGES/

	#cp $startdir/po/*.mo	$pkgdir/usr/share/locale/zh_CN/LC_MESSAGES/
	
	cd $startdir/po
	ls *.po >/tmp/polist
	cat "/tmp/polist" | grep -v "^#" | while read pofile; do
      	_mofilename=${pofile%po}mo
		msgfmt $startdir/po/${pofile} -o $pkgdir/usr/share/locale/zh_CN/LC_MESSAGES/${_mofilename}
	done
	rm -f /tmp/polist

	chmod 755 $pkgdir/usr/{bin,share/applications}
}